var rightData = []
var menu = getMenu(JSON.parse(JSON.stringify(rightData)), [])
function getMenu(origin, cur) {
  if (String(origin) === '' || !origin) {
    return cur
  } else {
    origin.forEach(item => {
      if (item.menuType === 1 || item.menuType === 2) {
        cur.push(item)
        if (String(item.children) !== '' || !origin) item.children = getMenu(item.children, [])
      }
    })
  }
  return cur
}

export {
    rightData,
    menu,
}